package org.studiox.graph.runtime.config;

import org.springframework.boot.Banner;
import org.springframework.boot.ansi.AnsiColor;
import org.springframework.boot.ansi.AnsiOutput;
import org.springframework.core.env.Environment;

import java.io.PrintStream;

public class GraphBanner implements Banner {

  private static final String BANNER =
      "  ____  _             _ _     __  __      ____                 _     \n"
          + " / ___|| |_ _   _  __| (_) ___\\ \\/ /     / ___|_ __ __ _ _ __ | |__  \n"
          + " \\___ \\| __| | | |/ _` | |/ _ \\\\  /     | |  _| '__/ _` | '_ \\| '_ \\ \n"
          + "  ___) | |_| |_| | (_| | | (_) /  \\     | |_| | | | (_| | |_) | | | |\n"
          + " |____/ \\__|\\__,_|\\__,_|_|\\___/_/\\_\\     \\____|_|  \\__,_| .__/|_| |_|\n"
          + "                                                        |_|          ";

  private static final String BANNER_SITE = "http://patorjk.com/software/taag";

  private static final String PROJECT_SITE = "https://gitee.com/studiox/graph";

  @Override
  public void printBanner(Environment environment, Class<?> sourceClass, PrintStream printStream) {
    printStream.println(AnsiOutput.toString(AnsiColor.GREEN, BANNER));
  }
}
